package com.lhd.admin.controller.v1;

import com.lhd.admin.service.AdUserService;
import com.lhd.model.admin.dtos.AdUserDto;
import com.lhd.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    private AdUserService adUserService;

    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdUserDto dto){
        System.out.println("开始登录=>"+dto.getName());
        return adUserService.login(dto);
    }

    @GetMapping
    public String getInfo(){
        return "路径正确";
    }
}
